package java6;

class Fish{
	int weight=0;
    }

class Lake{
	Fish fish;
	void setFish(Fish s) {
		fish = s;
		}
    Fish getFish(int n) {
    	fish.weight = fish.weight + n;
		return fish;
	    }
    void foodFish() {
	    fish.weight = 10;
        }
 }
public class fishandlake { 
	public static void main(String args[]) {
    Fish Fish1 = new Fish();
    Lake taihu =new Lake();
    taihu.setFish(Fish1);
    taihu.getFish(20);
    int n = taihu.fish.weight;
    Fish fish1=taihu.getFish(n);
    System.out.println(n);
    System.out.println(taihu.fish.weight);
    System.out.println(fish1.weight);
}
	}

